package com.christianposta.learnddd.domain.shared;

public class NotSpecification<T> extends AbstractSpecification<T> implements
		Specification<T> {

	private Specification<T> spec;

	public NotSpecification(Specification<T> spec){
		this.spec = spec;
	}
	
	public boolean isSatisfiedBy(T t) {
		return !spec.isSatisfiedBy(t);
	}

}
